package com.jyh.service;


import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jyh.config.BaseAction;
import com.jyh.config.datasource.TargetDataSource;
import com.jyh.dbUser.dao.PersonInfoDao;
import com.jyh.util.StringUtils;

@Service
public class ZhimaService extends BaseAction{
	@Autowired
	private PersonInfoDao personInfoDao;
	
	/**
	 * 查询芝麻分<map>
	 */
	@TargetDataSource(name = "three")
	public Map<String, Object> userCardInfo(String userIdCard) {
		String sql = "SELECT zm_score AS zimaFen FROM jyh_zhima_info WHERE 1=1 ";
		if (StringUtils.isNotNull(userIdCard)) {
			sql = sql + " and user_card_no='" + userIdCard + "'";
		}

		sql = sql +" order by operate_time desc limit 1 " ;
		Map<String, Object> map = personInfoDao.getMap(sql);
		return map;
	}

}
